110 COLOR 7,0:LOCATE 20,5:PRINT "any key";:COLOR 7,0:BEEP
120 Y$=INKEY$: IF Y$="" THEN 120
125 'array to restore soft keys
130 DATA "LIST ", RUN, LOAD", SAVE",CONT,LPT1,TRON,TROFF,"KEY ",SCREEN
140 FOR I=1 TO 10:READ KY$:IF I=2 OR I=5 OR I=7 OR I=8 THEN KY$=KY$+CHR$(13)
145 B$(I)=KY$:NEXT:B$(6)=","+CHR$(34)+B$(6)
147 'ascii to murray table for xmt
150 DATA 0,0,0,0,0,0,0,133,0,0,2,0,0,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,141,145,148,137,0,154,139,143,146,0,0,140,131,156,157,150,151,147,129,138,144,149,135,134,152,142,158,0,0,0,153,0
151 DATA 3,25,14,9,1,13,26,20,6,11,15,18,28,12,24,22,23,10,5,16,7,30,19,29,21,17,0,0,0,0,0,0,3,25,14,9,1,13,26,20,6,11,15,18,28,12,24,22,23,10,5,16,7,30,19,29,21,17,0,0,0,0,0,9
152 FOR I=0 TO 128:READ C(I):NEXT
155 'murray to ascii table for rcv
160 DATA "","",E,3,"","",A,-," "," ",S,"",I,8,U,7,"","",D,$,R,4,J,',N,",",F,!,C,":",K,(,T,5,Z,"",L,),W,2,H,#,Y,6,P,0,Q,1,O,9,B,?,G,&,f,f,M,.,X,/,V,;,~,~
170 FOR I= 0 TO 31:FOR J=0 TO 1:READ A$(I,J):NEXT:NEXT:A$(5,1)=CHR$(7):A$(17,1)=CHR$(34):A$(2,0)=CHR$(10):A$(2,1)=CHR$(10):A$(8,0)=CHR$(13):A$(8,1)=CHR$(13)
175 'menu
180 CLS:GOSUB 13000:LOCATE 1,4:PRINT STRING$(3,15);" MENU ";STRING$(3,15):PRINT
190 PRINT "1 }} Go to receive mode":PRINT:PRINT "2 }} Go to transmit mode":PRINT:PRINT "8 }} Exit to basic":PRINT :PRINT"9 }} Exit to DOS":PRINT
200 BEEP:COLOR 7,0:PRINT "Enter your choice":COLOR 7,0
205 CHOICE$=INKEY$:IF CHOICE$="" THEN 205 ELSE CHOICE=VAL(CHOICE$)
210 IF CHOICE <1 OR CHOICE >9 THEN GOTO 200
220 ON CHOICE GOTO 230,900,200,200,200,200,200,9000,9500
225 'start recv routine
230 SHFT=0: CLS:GOSUB 13000:LOCATE 1,1:PRINT "Date: ";DATE$;" Time: ";TIME$: IF PRN THEN LPRINT "Date: ";DATE$;" Time: ";TIME$
235 ON ERROR GOTO 15000
237 KEY(1)ON:KEY(2) ON
240 OPEN "COM1:110,N,5,2,RS,CS0,DS0,CD0" AS #1:WIDTH #1,255
245 OUT &H3FB,(INP(&H3FB) OR 128) 'enable speed change
250 OUT &H3F8,&HE7: OUT &H3F9,&H9 'change speed
260 OUT &H3FB,(INP (&H3FB) AND 127) 'restore
263 IF MENU.RET THEN CLOSE: MENU.RET=FALSE:IF NOT PRN THEN GOTO 180 ELSE LPRINT:GOTO 180
265 IF EOF(1) THEN GOTO 263
270 CH$= INPUT$(LOC(1),#1)
280 FOR I= 1 TO LEN(CH$)
285 CHM$=MID$(CH$,I,1)
286 IF ASC(CHM$)>31 OR ASC(CHM$)<1 THEN 400
300 CHA$= A$(ASC(CHM$),SHFT)
310 IF CHA$="f" THEN SHFT=1:GOTO 400
320 IF CHA$="~" THEN SHFT =0: GOTO 400
325 IF CRLF THEN IF CHA$=CHR$(13) THEN LOCATE CSRLIN,1:GOTO 400
326 IF CRLF THEN IF CHA$=CHR$(10) THEN GOTO 340
330 IF CHA$=" " OR CHA$=CHR$(13) OR CHA$=CHR$(10) THEN SHFT=0: CHA$=" "
340 PRINT CHA$;
350 IF PRN THEN LPRINT CHA$;
400 NEXT I
410 GOTO 263
898 STOP
899 'transmit routine
900 SHFT=0:OPEN "com1:110,n,5,2,cs0,ds0,cd0" AS #1:WIDTH #1,255
19090 PRINT"****ID SENT****";:FOR I=1 TO 1000:NEXT:MSG$=CHR$(13):RETURN 22005
19499 STOP'***dit***
19500 OUT &H3FB,IZ:FOR I=1 TO 120:NEXT:OUT &H3FB,IC:FOR I=1 TO 120:NEXT:RETURN
19599 STOP'***dah***
19600 OUT &H3FB,IZ:FOR I=1 TO 360:NEXT:OUT &H3FB,IC:FOR I=1 TO 120:NEXT:RETURN
19699 STOP'***space***
19700 FOR I= 1 TO 360:NEXT:RETURN
20000 LNGMSG=TRUE
20010 MSG1$=CHR$(13)+"bob johnson aa4l"+CHR$(13)+"11305 rums hill....raleigh nc....27614"+CHR$(13)+"ex w4cqj....ex k2eoc....member qcwa chapter 118"+CHR$(13)+"life member arrl....member rars....member wbcci arc"+CHR$(13)
20020 MSG2$="employed by ibm corp as senior engineer"+CHR$(13)+"rtty station:"+CHR$(13)+"128k ibm personal computer....ft101e....sb221....homebrew tu"+CHR$(13)+"vertical on 20 & inv vee on 40 & 80....end"+CHR$(13)
20030 RETURN 22000
21000 MSG$=CHR$(13)+"the quick brown fox jumped over the lazy dog's back"+CHR$(13)+"1m2m3m4m5m6m7m8m9m0m"+CHR$(13)+"ryryryryryryryryryryryryryryryryryryryryryryryryry"+CHR$(13)
21010 RETURN 22000
22000 FOR N=3 TO 7:KEY(N)STOP:NEXT N
22003 IF LNGMSG THEN MSG$=MSG1$
22005 FOR K=1 TO LEN(MSG$)
22010 CHX$=MID$(MSG$,K,1)
22020 CHX=C(ASC(CHX$))
22030 IF CHX=0 GOTO 22100
22040 IF CHX AND 128 THEN CHX=CHX AND 31:IF SHFT GOTO 22080 ELSE GOSUB 22500:GOTO 22080
22050 IF CHX=4 THEN GOSUB 22700:GOTO 22080
22060 IF CHX=8 THEN PRINT#1,CHR$(8);CHR$(2);CHR$(31);:SHFT=0:PRINT CHX$;:GOTO 22100
22070 IF SHFT THEN GOSUB 22700
22080 PRINT#1,CHR$(CHX);:PRINT CHX$;
22100 NEXT K
22101 IF LNGMSG THEN MSG$=MSG2$:LNGMSG=FALSE:GOTO 22005